package com.example.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.domain.Order;
import com.example.dto.WxChatBasePayDto;
import com.example.dto.WxChatPayDto;
import com.example.utils.Result;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

public interface WxOrderService extends IService<Order> {
    /**
     * 生成订单
     */
    Result addWxOrder(Order runOrder);

    /**
     * 微信用户调用微信支付
     */
    WxChatPayDto pay(WxChatBasePayDto payData);

    /**
     * 订单支付后回调
     */
    Map<String, String> wxOrderCallBack(HttpServletRequest request, HttpServletResponse response);

    /**
     * 订单退款
     */
    Result orderRefund(Integer id);

}
